Skip to content

Conversation

pre-commit-ci[bot]
Copy link
Contributor

@pre-commit-ci pre-commit-ci bot commented Oct 6, 2025

User description

updates:


PR Type

Enhancement


Description

  • Update pre-commit hooks to latest versions

  • Upgrade black to black-pre-commit-mirror


Diagram Walkthrough

flowchart LR
  A["Update pre-commit-hooks"] -- "v5.0.0 → v6.0.0" --> B["Update isort"]
  B -- "6.0.1 → 6.1.0" --> C["Change black repo URL"]
  C -- "black.git → black-pre-commit-mirror" --> D["Update black version"]
  D -- "25.1.0 → 25.9.0" --> E["Update blacken-docs"]
  E -- "1.19.1 → 1.20.0" --> F["Update ruff-pre-commit"]
  F -- "v0.12.2 → v0.13.3" --> G["Dependencies updated"]
Loading

File Walkthrough

Relevant files
Dependencies
.pre-commit-config.yaml
Update pre-commit hooks and dependencies                                 

.pre-commit-config.yaml

  • Updated pre-commit-hooks from v5.0.0 to v6.0.0
  • Updated isort from 6.0.1 to 6.1.0
  • Changed black repository URL to black-pre-commit-mirror
  • Updated black from 25.1.0 to 25.9.0
  • Updated blacken-docs from 1.19.1 to 1.20.0
  • Updated ruff-pre-commit from v0.12.2 to v0.13.3
+6/-6     

updates:
- [github.com/pre-commit/pre-commit-hooks: v5.0.0 → v6.0.0](pre-commit/pre-commit-hooks@v5.0.0...v6.0.0)
- [github.com/pycqa/isort: 6.0.1 → 6.1.0](PyCQA/isort@6.0.1...6.1.0)
- https://github.com/psf/black.githttps://github.com/psf/black-pre-commit-mirror
- [github.com/psf/black-pre-commit-mirror: 25.1.0 → 25.9.0](psf/black-pre-commit-mirror@25.1.0...25.9.0)
- [github.com/asottile/blacken-docs: 1.19.1 → 1.20.0](adamchainz/blacken-docs@1.19.1...1.20.0)
- [github.com/astral-sh/ruff-pre-commit: v0.12.2 → v0.13.3](astral-sh/ruff-pre-commit@v0.12.2...v0.13.3)
@PRAgent4INC
Copy link
Collaborator

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Version Compatibility

Ensure that the updated versions of pre-commit hooks, isort, black, blacken-docs, and ruff-pre-commit are compatible with the existing codebase and do not introduce breaking changes.

  rev: v6.0.0
  hooks:
    - id: end-of-file-fixer
      files: (.*\.(py|md|rst|yaml|yml))$
      exclude: |
        (?x)^(
            examples/.+|
            neural_compressor/torch/algorithms/fp8_quant/.+|
            test/3x/torch/algorithms/fp8_quant/.+
        )$
    - id: check-json
      exclude: |
        (?x)^(
            .vscode/settings_recommended.json
        )$
    - id: check-yaml
      exclude: |
        (?x)^(
          conda_meta/|
          neural_compressor/template/pruning.yaml|
          neural_compressor/adaptor/tensorflow_itex.yaml|
          neural_compressor/adaptor/tensorflow.yaml
        )$
    - id: debug-statements
    - id: file-contents-sorter
      exclude: |
        (?x)^(
            examples/.+
        )$
      args: [--unique]
    - id: requirements-txt-fixer
      exclude: |
        (?x)^(
            examples/.+
        )$
    - id: trailing-whitespace
      files: (.*\.(py|rst|cmake|yaml|yml))$
      exclude: |
        (?x)^(
            examples/.+|
            neural_compressor/torch/utils/.+|
            neural_compressor/torch/algorithms/fp8_quant/.+|
            test/3x/torch/quantization/.+
        )$

- repo: https://github.com/Lucas-C/pre-commit-hooks
  rev: v1.5.5
  hooks:
    - id: insert-license
      files: |
        (?x)^(
          neural_compressor/.*(py|yaml|yml|sh)
        )$
      args:
        [
          --license-filepath=.github/license_template.txt,
          --use-current-year,
          --detect-license-in-X-top-lines=40,
          --skip-license-insertion-comment=Copyright,
        ]

- repo: https://github.com/asottile/yesqa
  rev: v1.5.0
  hooks:
    - id: yesqa
      name: Unused noqa

- repo: https://github.com/pycqa/isort
  rev: 6.1.0
  hooks:
    - id: isort
      exclude: |
        (?x)^(
            examples/.+|
            neural_compressor/torch/algorithms/fp8_quant/.+|
            test/3x/torch/.+
        )$

- repo: https://github.com/PyCQA/docformatter
  rev: v1.7.7
  hooks:
    - id: docformatter
      args: [
          --in-place,
          --wrap-summaries=0, # 0 means disable wrap
          --wrap-descriptions=0, # 0 means disable wrap
          --black,
          --style=google,
        ]
      exclude: |
        (?x)^(
            examples/.+|
            neural_compressor/torch/algorithms/fp8_quant/.+|
            test/3x/torch/.+
        )$

- repo: https://github.com/psf/black-pre-commit-mirror
  rev: 25.9.0
  hooks:
    - id: black
      files: (.*\.py)$
      exclude: |
        (?x)^(
            examples/.+|
            neural_compressor/torch/algorithms/fp8_quant/.+|
            test/3x/torch/.+
        )$

- repo: https://github.com/asottile/blacken-docs
  rev: 1.20.0
  hooks:
    - id: blacken-docs
      args: [--line-length=120, --skip-errors]
      additional_dependencies:
        - black==25.1.0
      exclude: |
        (?x)^(
            examples/.+|
            neural_compressor/torch/algorithms/fp8_quant/.+|
            test/3x/torch/.+
        )$

- repo: https://github.com/codespell-project/codespell
  rev: v2.4.1
  hooks:
    - id: codespell
      args: [-w]
      additional_dependencies:
        - tomli
      exclude: |
        (?x)^(
            examples/.*(txt|patch)|
            examples/onnxrt/nlp/huggingface_model/text_generation/llama/quantization/ptq_static/prompt.json|
            examples/notebook/dynas/ResNet50_Quantiation_Search_Supernet_NAS.ipynb|
            examples/notebook/dynas/Transformer_LT_Supernet_NAS.ipynb|
            neural_compressor/torch/algorithms/fp8_quant/internal/diffusion_evaluation/SR_evaluation/imagenet1000_clsidx_to_labels.txt|
            neural_compressor/evaluation/hf_eval/datasets/cnn_validation.json|
            neural_compressor/torch/algorithms/fp8_quant/.+|
            test/3x/torch/.+
        )$

- repo: https://github.com/astral-sh/ruff-pre-commit
  rev: v0.13.3
  hooks:

@PRAgent4INC
Copy link
Collaborator

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Change Black repo URL

Update the Black repository URL to the official mirror.

.pre-commit-config.yaml [93-94]

-- repo: https://github.com/psf/black.git
-  rev: 25.1.0
+- repo: https://github.com/psf/black-pre-commit-mirror
+  rev: 25.9.0
Suggestion importance[1-10]: 8

__

Why: Updating the Black repository URL to the official mirror improves reliability and consistency.

Medium

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant